<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>用户页面</title>
</head>
<body>
<h1>欢迎 ${user.name}</h1>
<p>手机号: ${user.number}</p>
<p>余额: ${user.huafei} 元</p>
<p>套餐: 未知套餐(${user.taocan})</p>
<p>剩余资源:</p>
<button>随机消费</button>
<button>充值</button>
<button>退出</button>
<h2>最近消费记录</h2>
<table>
    <thead>
    <tr>
        <th>类型</th>
        <th>数量</th>
        <th>金额(元)</th>
        <th>时间</th>
        <th>备注</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach items="${consumptions}" var="consumption">
        <tr>
            <td>${consumption.consumption_type}</td>
            <td>${consumption.quantity}</td>
            <td>${consumption.amount}</td>
            <td><fmt:formatDate value="${consumption.consumption_time}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
            <td>${consumption.remark}</td>
        </tr>
    </c:forEach>
    </tbody>
</table>
</body>
</html>